package com.cskaoyan.javase.oop2._1extends._5protected._2demo.test;

import com.cskaoyan.javase.oop2._1extends._5protected._2demo.Student;

/**
 * 不同包下的子类
 * @since 17:15
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class StudentSon extends Student {
    public static void main(String[] args) {
        // 可以访问，但是必须创建子类自身对象才可以
        StudentSon ss = new StudentSon();
        System.out.println(ss.money);

        Student s = new Student();
        // s.money

        StudentSon2 ss2 = new StudentSon2();
        // ss2.money
    }
}

class StudentSon2 extends Student{}
